package com.woniuxy.microorderserver.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.woniuxy.microcommonserver.bean.order_caize.ExpressInfo;
import com.woniuxy.microcommonserver.bean.order_caize.OrderInfo;
import com.woniuxy.microcommonserver.pageHelper.PageRequest;
import com.woniuxy.microorderserver.mapper.ExpressMapper;
import com.woniuxy.microorderserver.service.IExpressService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Transactional(readOnly = true)
@Service
public class ExpressServiceImpl implements IExpressService {

    @Resource
    private ExpressMapper expressMapper;

    /**
     * 分页查看全部快递单
     */
    @Override
    public PageInfo<ExpressInfo> findAllExpress(PageRequest request) {
        return PageHelper.startPage(request.getPageNum(),request.getLimit()).
                doSelectPageInfo(()->expressMapper.findAllExpress(request));
    }


}
